<template>
  <div class="coupon">
    <el-table :data="tableData" border style="width: 100%">
      <el-table-column align="center" label="图片">
        <template slot-scope="scope">
          <img :src="scope.row.photo" style="width:100px;height:80px;" alt>
        </template>
      </el-table-column>
      <el-table-column prop="name" align="center" label="商品名" />
      <el-table-column prop="text" align="center" label="商品介绍" />
      <el-table-column prop="money" align="center" label="原价" />
      <el-table-column prop="money2" align="center" label="优惠卷金额" />
      <el-table-column prop="money3" align="center" label="卷后价" />
      <el-table-column prop="num" align="center" label="已买人数" />
      <el-table-column label="操作" width="220" align="center">
        <template slot-scope="scope">
          <el-button size="mini" type="success">领取优惠卷</el-button>
        </template>
      </el-table-column>
    </el-table>
  </div>
</template>
<script>
export default {
  data() {
    return {
      currentPage: 1, // 初始页
      pagesize: 10, // 当前页面内的列表行数
      pageCount: 1,
      pageNum: 1, // 页数
      total: 3,
      tableData: [
        {
          photo:
            'http://img.guju.com.cn/products/ff27000ef650aab0.jpg',
          text: '白纱窗帘透光不透人窗纱纯色雪纺纱阳台纱客厅隔断纱白沙成品定制',
          name: '白纱窗帘',
          money: '20元',
          money2: '5元',
          money3: '15元',
          num: '18989次'
        },
        {
          photo:
            'http://a0.att.hudong.com/18/68/01300384640925132825688405753.jpg',
          text: '本品为浅棕色至深棕色的颗粒，味甜、微苦。每盒含9包，每包袋装10g。解热镇痛功效，用于因感冒引起的头痛，发热，鼻塞，流涕，咽痛等症状。',
          name: '999感冒灵颗粒',
          money: '50元',
          money2: '20元',
          money3: '30元',
          num: '1898954156次'
        },
        {
          photo:
            'http://img01.hstyf360.com/group1/M00/02/36/wKgLN1c0Za-AFUSSAAAun2yCKuY429.jpg',
          text: '本品所含醋酸地塞米松为糖皮质激素，具有抗炎、抗过敏作用；薄荷脑、樟脑具有促进局部循环和轻度的消炎、止痛及止痒作用。',
          name: '999皮炎平',
          money: '30元',
          money2: '10元',
          money3: '20元',
          num: '1898956465次'
        }
      ]
    }
  },
  mounted() {},
  methods: {
    // 当前页
    handleSizeChange: function(pagesize) {
      this.pagesize = pagesize
    },
    // 换页：更新列表数据
    handleCurrentChange: function(currentPage) {
      this.currentPage = currentPage
    }
  }
}
</script>
<style lang="scss" scoped>
.coupon {
  margin-top: 55px;
}
</style>
